Integrand size = 48, antiderivative size = 214 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=a^4 (b B-a C) x+\frac {b \left (32 a^3 b B+16 a b^3 B-24 a^4 C+8 a^2 b^2 C+3 b^4 C\right ) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {b^2 \left (34 a^2 b B+4 b^3 B-15 a^3 C+12 a b^2 C\right ) \tan (c+d x)}{6 d}+\frac {b^3 \left (32 a b B-6 a^2 C+9 b^2 C\right ) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {b^2 (4 b B+3 a C) (a+b \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {b^2 C (a+b \sec (c+d x))^3 \tan (c+d x)}{4 d} \]
a^4*(B*b-C*a)*x+1/8*b*(32*B*a^3*b+16*B*a*b^3-24*C*a^4+8*C*a^2*b^2+3*C*b^4) *arctanh(sin(d*x+c))/d+1/6*b^2*(34*B*a^2*b+4*B*b^3-15*C*a^3+12*C*a*b^2)*ta n(d*x+c)/d+1/24*b^3*(32*B*a*b-6*C*a^2+9*C*b^2)*sec(d*x+c)*tan(d*x+c)/d+1/1 2*b^2*(4*B*b+3*C*a)*(a+b*sec(d*x+c))^2*tan(d*x+c)/d+1/4*b^2*C*(a+b*sec(d*x +c))^3*tan(d*x+c)/d
Time = 1.71 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.79 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=\frac {24 a^4 (b B-a C) d x+3 b \left (32 a^3 b B+16 a b^3 B-24 a^4 C+8 a^2 b^2 C+3 b^4 C\right ) \text {arctanh}(\sin (c+d x))+3 b^2 \left (8 \left (6 a^2 b B+b^3 B-2 a^3 C+3 a b^2 C\right )+b \left (16 a b B+8 a^2 C+3 b^2 C\right ) \sec (c+d x)+2 b^3 C \sec ^3(c+d x)\right ) \tan (c+d x)+8 b^4 (b B+3 a C) \tan ^3(c+d x)}{24 d} \]
Integrate[(a + b*Sec[c + d*x])^3*(a*b*B - a^2*C + b^2*B*Sec[c + d*x] + b^2 *C*Sec[c + d*x]^2),x]
(24*a^4*(b*B - a*C)*d*x + 3*b*(32*a^3*b*B + 16*a*b^3*B - 24*a^4*C + 8*a^2* b^2*C + 3*b^4*C)*ArcTanh[Sin[c + d*x]] + 3*b^2*(8*(6*a^2*b*B + b^3*B - 2*a ^3*C + 3*a*b^2*C) + b*(16*a*b*B + 8*a^2*C + 3*b^2*C)*Sec[c + d*x] + 2*b^3* C*Sec[c + d*x]^3)*Tan[c + d*x] + 8*b^4*(b*B + 3*a*C)*Tan[c + d*x]^3)/(24*d )
Time = 0.97 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.10, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 4529, 3042, 4406, 3042, 4544, 3042, 4536, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sec (c+d x))^3 \left (a^2 (-C)+a b B+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (a^2 (-C)+a b B+b^2 B \csc \left (c+d x+\frac {\pi }{2}\right )+b^2 C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4529 |
\(\displaystyle \frac {\int (a+b \sec (c+d x))^4 \left (C \sec (c+d x) b^3+(b B-a C) b^2\right )dx}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^4 \left (C \csc \left (c+d x+\frac {\pi }{2}\right ) b^3+(b B-a C) b^2\right )dx}{b^2}\) |
\(\Big \downarrow \) 4406 |
\(\displaystyle \frac {\frac {1}{4} \int (a+b \sec (c+d x))^2 \left ((4 b B+3 a C) \sec ^2(c+d x) b^4+\left (-4 C a^2+8 b B a+3 b^2 C\right ) \sec (c+d x) b^3+4 a^2 (b B-a C) b^2\right )dx+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left ((4 b B+3 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^4+\left (-4 C a^2+8 b B a+3 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right ) b^3+4 a^2 (b B-a C) b^2\right )dx+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
\(\Big \downarrow \) 4544 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int (a+b \sec (c+d x)) \left (\left (-6 C a^2+32 b B a+9 b^2 C\right ) \sec ^2(c+d x) b^4+\left (-24 C a^3+36 b B a^2+15 b^2 C a+8 b^3 B\right ) \sec (c+d x) b^3+12 a^3 (b B-a C) b^2\right )dx+\frac {b^4 (3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (\left (-6 C a^2+32 b B a+9 b^2 C\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^4+\left (-24 C a^3+36 b B a^2+15 b^2 C a+8 b^3 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right ) b^3+12 a^3 (b B-a C) b^2\right )dx+\frac {b^4 (3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
\(\Big \downarrow \) 4536 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \left (24 b^2 (b B-a C) a^4+4 b^4 \left (-15 C a^3+34 b B a^2+12 b^2 C a+4 b^3 B\right ) \sec ^2(c+d x)+3 b^3 \left (-24 C a^4+32 b B a^3+8 b^2 C a^2+16 b^3 B a+3 b^4 C\right ) \sec (c+d x)\right )dx+\frac {b^5 \left (-6 a^2 C+32 a b B+9 b^2 C\right ) \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {b^4 (3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{3} \left (\frac {b^5 \left (-6 a^2 C+32 a b B+9 b^2 C\right ) \tan (c+d x) \sec (c+d x)}{2 d}+\frac {1}{2} \left (24 a^4 b^2 x (b B-a C)+\frac {4 b^4 \left (-15 a^3 C+34 a^2 b B+12 a b^2 C+4 b^3 B\right ) \tan (c+d x)}{d}+\frac {3 b^3 \left (-24 a^4 C+32 a^3 b B+8 a^2 b^2 C+16 a b^3 B+3 b^4 C\right ) \text {arctanh}(\sin (c+d x))}{d}\right )\right )+\frac {b^4 (3 a C+4 b B) \tan (c+d x) (a+b \sec (c+d x))^2}{3 d}\right )+\frac {b^4 C \tan (c+d x) (a+b \sec (c+d x))^3}{4 d}}{b^2}\) |
((b^4*C*(a + b*Sec[c + d*x])^3*Tan[c + d*x])/(4*d) + ((b^4*(4*b*B + 3*a*C) *(a + b*Sec[c + d*x])^2*Tan[c + d*x])/(3*d) + ((b^5*(32*a*b*B - 6*a^2*C + 9*b^2*C)*Sec[c + d*x]*Tan[c + d*x])/(2*d) + (24*a^4*b^2*(b*B - a*C)*x + (3 *b^3*(32*a^3*b*B + 16*a*b^3*B - 24*a^4*C + 8*a^2*b^2*C + 3*b^4*C)*ArcTanh[ Sin[c + d*x]])/d + (4*b^4*(34*a^2*b*B + 4*b^3*B - 15*a^3*C + 12*a*b^2*C)*T an[c + d*x])/d)/2)/3)/4)/b^2
3.9.97.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Simp[1/m Int[(a + b*Csc[e + f*x])^(m - 2)*Simp[a^2*c*m + (b^2*d*(m - 1) + 2*a*b*c*m + a^2*d*m)*Csc[e + f*x] + b*(b*c*m + a*d*(2*m - 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b* c - a*d, 0] && GtQ[m, 1] && NeQ[a^2 - b^2, 0] && IntegerQ[2*m]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*Simp[b*B - a*C + b*C*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*(Cot[e + f*x]/(2*f)), x] + Simp[1/2 Int[Simp[2*A*a + (2*B*a + b*(2* A + C))*Csc[e + f*x] + 2*(a*C + B*b)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a , b, e, f, A, B, C}, x]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Simp[(-C)*Cot [e + f*x]*((a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[1/(m + 1) Int[( a + b*Csc[e + f*x])^(m - 1)*Simp[a*A*(m + 1) + ((A*b + a*B)*(m + 1) + b*C*m )*Csc[e + f*x] + (b*B*(m + 1) + a*C*m)*Csc[e + f*x]^2, x], x], x] /; FreeQ[ {a, b, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && IGtQ[2*m, 0]
Time = 1.36 (sec) , antiderivative size = 219, normalized size of antiderivative = 1.02
method | result | size |
parts | \(a^{4} \left (B b -C a \right ) x -\frac {\left (B \,b^{5}+3 C a \,b^{4}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (4 a \,b^{4} B +2 C \,a^{2} b^{3}\right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {\left (6 B \,a^{2} b^{3}-2 C \,a^{3} b^{2}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (4 a^{3} b^{2} B -3 a^{4} b C \right ) \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C \,b^{5} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(219\) |
derivativedivides | \(\frac {B \,a^{4} b \left (d x +c \right )-a^{5} C \left (d x +c \right )+4 a^{3} b^{2} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-2 C \,a^{3} b^{2} \tan \left (d x +c \right )-3 a^{4} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 B \,a^{2} b^{3} \tan \left (d x +c \right )+2 C \,a^{2} b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 a \,b^{4} B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 C a \,b^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-B \,b^{5} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{5} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(278\) |
default | \(\frac {B \,a^{4} b \left (d x +c \right )-a^{5} C \left (d x +c \right )+4 a^{3} b^{2} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-2 C \,a^{3} b^{2} \tan \left (d x +c \right )-3 a^{4} b C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+6 B \,a^{2} b^{3} \tan \left (d x +c \right )+2 C \,a^{2} b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 a \,b^{4} B \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-3 C a \,b^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-B \,b^{5} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+C \,b^{5} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(278\) |
parallelrisch | \(\frac {-384 \left (B \,a^{3} b +\frac {1}{2} B a \,b^{3}-\frac {3}{4} a^{4} C +\frac {1}{4} C \,a^{2} b^{2}+\frac {3}{32} C \,b^{4}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+384 \left (B \,a^{3} b +\frac {1}{2} B a \,b^{3}-\frac {3}{4} a^{4} C +\frac {1}{4} C \,a^{2} b^{2}+\frac {3}{32} C \,b^{4}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+96 a^{4} d x \left (B b -C a \right ) \cos \left (2 d x +2 c \right )+24 a^{4} d x \left (B b -C a \right ) \cos \left (4 d x +4 c \right )+\left (288 B \,a^{2} b^{3}+64 B \,b^{5}-96 C \,a^{3} b^{2}+192 C a \,b^{4}\right ) \sin \left (2 d x +2 c \right )+\left (144 B \,a^{2} b^{3}+16 B \,b^{5}-48 C \,a^{3} b^{2}+48 C a \,b^{4}\right ) \sin \left (4 d x +4 c \right )+\left (96 a \,b^{4} B +48 C \,a^{2} b^{3}+18 C \,b^{5}\right ) \sin \left (3 d x +3 c \right )+\left (96 a \,b^{4} B +48 C \,a^{2} b^{3}+66 C \,b^{5}\right ) \sin \left (d x +c \right )+72 a^{4} d x \left (B b -C a \right )}{24 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(385\) |
norman | \(\frac {\left (B \,a^{4} b -a^{5} C \right ) x +\left (-4 B \,a^{4} b +4 a^{5} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-4 B \,a^{4} b +4 a^{5} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (B \,a^{4} b -a^{5} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (6 B \,a^{4} b -6 a^{5} C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {b^{2} \left (48 B \,a^{2} b -16 B a \,b^{2}+8 B \,b^{3}-16 a^{3} C -8 a^{2} b C +24 C a \,b^{2}-5 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {b^{2} \left (48 B \,a^{2} b +16 B a \,b^{2}+8 B \,b^{3}-16 a^{3} C +8 a^{2} b C +24 C a \,b^{2}+5 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {b^{2} \left (432 B \,a^{2} b -48 B a \,b^{2}+40 B \,b^{3}-144 a^{3} C -24 a^{2} b C +120 C a \,b^{2}+9 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {b^{2} \left (432 B \,a^{2} b +48 B a \,b^{2}+40 B \,b^{3}-144 a^{3} C +24 a^{2} b C +120 C a \,b^{2}-9 C \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}-\frac {b \left (32 B \,a^{3} b +16 B a \,b^{3}-24 a^{4} C +8 C \,a^{2} b^{2}+3 C \,b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {b \left (32 B \,a^{3} b +16 B a \,b^{3}-24 a^{4} C +8 C \,a^{2} b^{2}+3 C \,b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(511\) |
risch | \(B \,a^{4} b x -C \,a^{5} x -\frac {i b^{2} \left (48 a^{3} C -48 C a \,b^{2}-16 B \,b^{3}-144 B \,a^{2} b -48 B \,b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+24 C \,a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-144 C a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-432 B \,a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-432 B \,a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+24 C \,a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}+48 B a \,b^{2} {\mathrm e}^{7 i \left (d x +c \right )}-144 B \,a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}+48 B a \,b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-48 B a \,b^{2} {\mathrm e}^{i \left (d x +c \right )}-24 C \,a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}-192 C a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-24 C \,a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}-48 B a \,b^{2} {\mathrm e}^{3 i \left (d x +c \right )}-33 C \,b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-64 B \,b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-9 C \,b^{3} {\mathrm e}^{i \left (d x +c \right )}+144 C \,a^{3} {\mathrm e}^{2 i \left (d x +c \right )}+9 C \,b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+48 C \,a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+144 C \,a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+33 C \,b^{3} {\mathrm e}^{5 i \left (d x +c \right )}\right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {4 b^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,a^{3}}{d}-\frac {2 b^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B a}{d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{4} C}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C \,a^{2}}{d}-\frac {3 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{8 d}+\frac {4 b^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,a^{3}}{d}+\frac {2 b^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B a}{d}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{4} C}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C \,a^{2}}{d}+\frac {3 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{8 d}\) | \(643\) |
int((a+b*sec(d*x+c))^3*(B*a*b-C*a^2+b^2*B*sec(d*x+c)+b^2*C*sec(d*x+c)^2),x ,method=_RETURNVERBOSE)
a^4*(B*b-C*a)*x-(B*b^5+3*C*a*b^4)/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+(4* B*a*b^4+2*C*a^2*b^3)/d*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d* x+c)))+(6*B*a^2*b^3-2*C*a^3*b^2)/d*tan(d*x+c)+(4*B*a^3*b^2-3*C*a^4*b)/d*ln (sec(d*x+c)+tan(d*x+c))+C*b^5/d*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d *x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))
Time = 0.29 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.25 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=-\frac {48 \, {\left (C a^{5} - B a^{4} b\right )} d x \cos \left (d x + c\right )^{4} + 3 \, {\left (24 \, C a^{4} b - 32 \, B a^{3} b^{2} - 8 \, C a^{2} b^{3} - 16 \, B a b^{4} - 3 \, C b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (24 \, C a^{4} b - 32 \, B a^{3} b^{2} - 8 \, C a^{2} b^{3} - 16 \, B a b^{4} - 3 \, C b^{5}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (6 \, C b^{5} - 16 \, {\left (3 \, C a^{3} b^{2} - 9 \, B a^{2} b^{3} - 3 \, C a b^{4} - B b^{5}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (8 \, C a^{2} b^{3} + 16 \, B a b^{4} + 3 \, C b^{5}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (3 \, C a b^{4} + B b^{5}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
integrate((a+b*sec(d*x+c))^3*(B*a*b-C*a^2+b^2*B*sec(d*x+c)+b^2*C*sec(d*x+c )^2),x, algorithm="fricas")
-1/48*(48*(C*a^5 - B*a^4*b)*d*x*cos(d*x + c)^4 + 3*(24*C*a^4*b - 32*B*a^3* b^2 - 8*C*a^2*b^3 - 16*B*a*b^4 - 3*C*b^5)*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(24*C*a^4*b - 32*B*a^3*b^2 - 8*C*a^2*b^3 - 16*B*a*b^4 - 3*C*b^5)* cos(d*x + c)^4*log(-sin(d*x + c) + 1) - 2*(6*C*b^5 - 16*(3*C*a^3*b^2 - 9*B *a^2*b^3 - 3*C*a*b^4 - B*b^5)*cos(d*x + c)^3 + 3*(8*C*a^2*b^3 + 16*B*a*b^4 + 3*C*b^5)*cos(d*x + c)^2 + 8*(3*C*a*b^4 + B*b^5)*cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=- \int C a^{5}\, dx - \int \left (- B a^{4} b\right )\, dx - \int \left (- B b^{5} \sec ^{4}{\left (c + d x \right )}\right )\, dx - \int \left (- C b^{5} \sec ^{5}{\left (c + d x \right )}\right )\, dx - \int \left (- 4 B a b^{4} \sec ^{3}{\left (c + d x \right )}\right )\, dx - \int \left (- 6 B a^{2} b^{3} \sec ^{2}{\left (c + d x \right )}\right )\, dx - \int \left (- 4 B a^{3} b^{2} \sec {\left (c + d x \right )}\right )\, dx - \int \left (- 3 C a b^{4} \sec ^{4}{\left (c + d x \right )}\right )\, dx - \int \left (- 2 C a^{2} b^{3} \sec ^{3}{\left (c + d x \right )}\right )\, dx - \int 2 C a^{3} b^{2} \sec ^{2}{\left (c + d x \right )}\, dx - \int 3 C a^{4} b \sec {\left (c + d x \right )}\, dx \]
-Integral(C*a**5, x) - Integral(-B*a**4*b, x) - Integral(-B*b**5*sec(c + d *x)**4, x) - Integral(-C*b**5*sec(c + d*x)**5, x) - Integral(-4*B*a*b**4*s ec(c + d*x)**3, x) - Integral(-6*B*a**2*b**3*sec(c + d*x)**2, x) - Integra l(-4*B*a**3*b**2*sec(c + d*x), x) - Integral(-3*C*a*b**4*sec(c + d*x)**4, x) - Integral(-2*C*a**2*b**3*sec(c + d*x)**3, x) - Integral(2*C*a**3*b**2* sec(c + d*x)**2, x) - Integral(3*C*a**4*b*sec(c + d*x), x)
Time = 0.23 (sec) , antiderivative size = 320, normalized size of antiderivative = 1.50 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=-\frac {48 \, {\left (d x + c\right )} C a^{5} - 48 \, {\left (d x + c\right )} B a^{4} b - 48 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a b^{4} - 16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B b^{5} + 3 \, C b^{5} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 24 \, C a^{2} b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, B a b^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 144 \, C a^{4} b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) - 192 \, B a^{3} b^{2} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 96 \, C a^{3} b^{2} \tan \left (d x + c\right ) - 288 \, B a^{2} b^{3} \tan \left (d x + c\right )}{48 \, d} \]
integrate((a+b*sec(d*x+c))^3*(B*a*b-C*a^2+b^2*B*sec(d*x+c)+b^2*C*sec(d*x+c )^2),x, algorithm="maxima")
-1/48*(48*(d*x + c)*C*a^5 - 48*(d*x + c)*B*a^4*b - 48*(tan(d*x + c)^3 + 3* tan(d*x + c))*C*a*b^4 - 16*(tan(d*x + c)^3 + 3*tan(d*x + c))*B*b^5 + 3*C*b ^5*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c) ^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d*x + c) - 1)) + 24*C*a^2*b^ 3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d *x + c) - 1)) + 48*B*a*b^4*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin( d*x + c) + 1) + log(sin(d*x + c) - 1)) + 144*C*a^4*b*log(sec(d*x + c) + ta n(d*x + c)) - 192*B*a^3*b^2*log(sec(d*x + c) + tan(d*x + c)) + 96*C*a^3*b^ 2*tan(d*x + c) - 288*B*a^2*b^3*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 658 vs. \(2 (205) = 410\).
Time = 0.36 (sec) , antiderivative size = 658, normalized size of antiderivative = 3.07 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=-\frac {24 \, {\left (C a^{5} - B a^{4} b\right )} {\left (d x + c\right )} + 3 \, {\left (24 \, C a^{4} b - 32 \, B a^{3} b^{2} - 8 \, C a^{2} b^{3} - 16 \, B a b^{4} - 3 \, C b^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (24 \, C a^{4} b - 32 \, B a^{3} b^{2} - 8 \, C a^{2} b^{3} - 16 \, B a b^{4} - 3 \, C b^{5}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (48 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 144 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 48 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 72 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, B b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 144 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 432 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 24 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 48 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 120 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 40 \, B b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 144 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 432 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 24 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 48 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, B b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 48 \, C a^{3} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 144 \, B a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, C a^{2} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 48 \, B a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 72 \, C a b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, B b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, C b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
integrate((a+b*sec(d*x+c))^3*(B*a*b-C*a^2+b^2*B*sec(d*x+c)+b^2*C*sec(d*x+c )^2),x, algorithm="giac")
-1/24*(24*(C*a^5 - B*a^4*b)*(d*x + c) + 3*(24*C*a^4*b - 32*B*a^3*b^2 - 8*C *a^2*b^3 - 16*B*a*b^4 - 3*C*b^5)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(2 4*C*a^4*b - 32*B*a^3*b^2 - 8*C*a^2*b^3 - 16*B*a*b^4 - 3*C*b^5)*log(abs(tan (1/2*d*x + 1/2*c) - 1)) - 2*(48*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^7 - 144*B*a ^2*b^3*tan(1/2*d*x + 1/2*c)^7 + 24*C*a^2*b^3*tan(1/2*d*x + 1/2*c)^7 + 48*B *a*b^4*tan(1/2*d*x + 1/2*c)^7 - 72*C*a*b^4*tan(1/2*d*x + 1/2*c)^7 - 24*B*b ^5*tan(1/2*d*x + 1/2*c)^7 + 15*C*b^5*tan(1/2*d*x + 1/2*c)^7 - 144*C*a^3*b^ 2*tan(1/2*d*x + 1/2*c)^5 + 432*B*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 - 24*C*a^2 *b^3*tan(1/2*d*x + 1/2*c)^5 - 48*B*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 120*C*a* b^4*tan(1/2*d*x + 1/2*c)^5 + 40*B*b^5*tan(1/2*d*x + 1/2*c)^5 + 9*C*b^5*tan (1/2*d*x + 1/2*c)^5 + 144*C*a^3*b^2*tan(1/2*d*x + 1/2*c)^3 - 432*B*a^2*b^3 *tan(1/2*d*x + 1/2*c)^3 - 24*C*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 - 48*B*a*b^4 *tan(1/2*d*x + 1/2*c)^3 - 120*C*a*b^4*tan(1/2*d*x + 1/2*c)^3 - 40*B*b^5*ta n(1/2*d*x + 1/2*c)^3 + 9*C*b^5*tan(1/2*d*x + 1/2*c)^3 - 48*C*a^3*b^2*tan(1 /2*d*x + 1/2*c) + 144*B*a^2*b^3*tan(1/2*d*x + 1/2*c) + 24*C*a^2*b^3*tan(1/ 2*d*x + 1/2*c) + 48*B*a*b^4*tan(1/2*d*x + 1/2*c) + 72*C*a*b^4*tan(1/2*d*x + 1/2*c) + 24*B*b^5*tan(1/2*d*x + 1/2*c) + 15*C*b^5*tan(1/2*d*x + 1/2*c))/ (tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 20.51 (sec) , antiderivative size = 3157, normalized size of antiderivative = 14.75 \[ \int (a+b \sec (c+d x))^3 \left (a b B-a^2 C+b^2 B \sec (c+d x)+b^2 C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
(tan(c/2 + (d*x)/2)*(2*B*b^5 + (5*C*b^5)/4 + 12*B*a^2*b^3 + 2*C*a^2*b^3 - 4*C*a^3*b^2 + 4*B*a*b^4 + 6*C*a*b^4) + tan(c/2 + (d*x)/2)^7*((5*C*b^5)/4 - 2*B*b^5 - 12*B*a^2*b^3 + 2*C*a^2*b^3 + 4*C*a^3*b^2 + 4*B*a*b^4 - 6*C*a*b^ 4) - tan(c/2 + (d*x)/2)^3*((10*B*b^5)/3 - (3*C*b^5)/4 + 36*B*a^2*b^3 + 2*C *a^2*b^3 - 12*C*a^3*b^2 + 4*B*a*b^4 + 10*C*a*b^4) + tan(c/2 + (d*x)/2)^5*( (10*B*b^5)/3 + (3*C*b^5)/4 + 36*B*a^2*b^3 - 2*C*a^2*b^3 - 12*C*a^3*b^2 - 4 *B*a*b^4 + 10*C*a*b^4))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^ 2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) - (atan(((tan(c/2 + (d*x)/2)*(32*C^2*a^10 + (9*C^2*b^10)/2 + 128*B^2*a^2*b^8 + 512*B^2*a^4*b ^6 + 512*B^2*a^6*b^4 + 32*B^2*a^8*b^2 + 24*C^2*a^2*b^8 - 40*C^2*a^4*b^6 - 192*C^2*a^6*b^4 + 288*C^2*a^8*b^2 + 48*B*C*a*b^9 - 64*B*C*a^9*b + 224*B*C* a^3*b^7 - 128*B*C*a^5*b^5 - 768*B*C*a^7*b^3) + ((3*C*b^5)/8 + 4*B*a^3*b^2 + C*a^2*b^3 + 2*B*a*b^4 - 3*C*a^4*b)*(12*C*b^5 - 32*C*a^5 + 128*B*a^3*b^2 + 32*C*a^2*b^3 + 64*B*a*b^4 + 32*B*a^4*b - 96*C*a^4*b))*((3*C*b^5)/8 + 4*B *a^3*b^2 + C*a^2*b^3 + 2*B*a*b^4 - 3*C*a^4*b)*1i + (tan(c/2 + (d*x)/2)*(32 *C^2*a^10 + (9*C^2*b^10)/2 + 128*B^2*a^2*b^8 + 512*B^2*a^4*b^6 + 512*B^2*a ^6*b^4 + 32*B^2*a^8*b^2 + 24*C^2*a^2*b^8 - 40*C^2*a^4*b^6 - 192*C^2*a^6*b^ 4 + 288*C^2*a^8*b^2 + 48*B*C*a*b^9 - 64*B*C*a^9*b + 224*B*C*a^3*b^7 - 128* B*C*a^5*b^5 - 768*B*C*a^7*b^3) - ((3*C*b^5)/8 + 4*B*a^3*b^2 + C*a^2*b^3 + 2*B*a*b^4 - 3*C*a^4*b)*(12*C*b^5 - 32*C*a^5 + 128*B*a^3*b^2 + 32*C*a^2*...